import React from 'react'
import { View } from '@tarojs/components'
import './MyDoctorListPlaceholder.scss'

const RenderCard = () => (
  <View className="myDoctorCard-placeholder">
    <View className="avatar-placeholder skeleton-blink" />
    <View className="rightContainer-placeholder">
      <View className="userName-placeholder skeleton-blink" />
      <View className="userDesc-placeholder skeleton-blink" />
    </View>
  </View>
)

const MyDoctorListPlaceholder = ({ count }) => (
  <View className="myDoctorList-Placeholder">
    {[...Array(count)].map((item, index) => <RenderCard key={index.toString()} />)}
  </View>
)

export default MyDoctorListPlaceholder
